/*
============================================================================
 Name        : BlockScrollInfo.h
 Author      : 
 Version     :
 Copyright   : Your copyright notice
 Description : CBlockScrollInfo declaration
============================================================================
*/

#ifndef BLOCKSCROLLINFO_H
#define BLOCKSCROLLINFO_H

// INCLUDES
#include <e32std.h>
#include <e32base.h>
#include "Block.h"
#include "BlockInfoTitle.h"
// CLASS DECLARATION


class CHYInfoData
{
public:
	CHYInfoData();
	virtual ~CHYInfoData();
public:
	HBufC* m_pTitle;
	HBufC* m_pText;
};
/**
*  CBlockScrollInfo
* 
*/
class CBlockScrollInfo : public CBlock
{
public: 
	~CBlockScrollInfo();

	static CBlockScrollInfo* NewL();

	static CBlockScrollInfo* NewLC();

public:
	//from CBlock
	void OnDraw(CFbsBitGc& g);

	void SizeChanged();

	/*TBool ReadData(const TDesC8& aData);

	void WriteData(TDes8& aBuf);

	TInt GetDataLength();

	TInt16 GetDataType();*/

	void OnKeyEvent(TInt keyCode);

public:
	static TInt OnTitleRoll(TAny* aAny);

	void UpdatePosition();

	TRect GetRect(){return m_rect;}

	void StartScroll();

	void ShowScrollInfo(TBool aShow);
	
public:
	TBool GetHYURL(TDes8& aUri);

	TBool ParseJSONArray(const TDesC8& aJson);

private:
	CBlockScrollInfo();

	void ConstructL();

public:
	RPointerArray<CHYInfoData> m_vRollInfo;
	CDesCArray* m_pstrSummary;
	CDesCArray* m_pstrTime;

private:
	TInt m_nInfoRollTime;
	CPeriodic*	m_AnimationTimer;	//\xD7\xD6\x{013b}\xB9\xF6\xB6\xAF

	TInt m_nYOffset;
	TInt m_nXOffset;
	TInt m_nCurIndex;

	TBuf<32> m_strDefaultRoll;
	TBuf<128> m_strDraw;
	TBuf<32> m_strStarKey;
	
	CFont* iFont;
};

#endif // BLOCKSCROLLINFO_H
